package org.zpmis.domain.label.enums;

public enum LabelEnum {

    /**
     * 是否删除
     */
    NOT_DELETE(0, "未删除"),
    DELETED(1, "已删除"),
    /**
     * 标签类型 1箱标 2号段
     */
    LABEL_TYPE_BOX(1,"箱标"),
    LABEL_TYPE_SEGMENT(2,"号段"),

    /**
     * 使用方式 1凭证 2号段
     */
    USE_MODE_VOUCHER(1,"凭证"),
    USE_MODE_SEGMENT(2,"号段"),

    /**
     * 激活状态 0 未激活 1 已激活 2 客户激活 3 等通知
     */
    ACTIVE_STATUS_NO(0,"未激活"),
    ACTIVE_STATUS_SUCCESS(1,"已激活"),
    ACTIVE_STATUS_CUSTOMER(2,"客户激活"),
    ACTIVE_STATUS_WAIT_NOTICE(3,"等通知"),
    ACTIVE_STATUS_CANCEL(4,"已作废"),
    ;

    private int code;
    private String message;

    LabelEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int code() {
        return this.code;
    }


    public String message() {
        return this.message;
    }

    public static String labelTypeValueOfCode(Integer labelType){
        if(labelType == null){
            return LabelEnum.LABEL_TYPE_BOX.message+"&"+LabelEnum.LABEL_TYPE_SEGMENT.message;
        }else if(labelType == 1){
            return LabelEnum.LABEL_TYPE_BOX.message;
        }else if(labelType == 2){
            return LabelEnum.LABEL_TYPE_SEGMENT.message;
        }else{
            return "";
        }
    }

    public static String useModelValueOfCode(Integer useModel){
        if(useModel == null){
            return "";
        }else if(useModel == 1){
            return LabelEnum.USE_MODE_VOUCHER.message;
        }else if(useModel == 2){
            return LabelEnum.USE_MODE_SEGMENT.message;
        }else{
            return "";
        }
    }

    public static String activeStatusValueOfCode(Integer useModel){
        if(useModel == null){
            return "";
        }else if(useModel == 0){
            return LabelEnum.ACTIVE_STATUS_NO.message;
        }else if(useModel == 1){
            return LabelEnum.ACTIVE_STATUS_SUCCESS.message;
        }else if(useModel == 2){
            return LabelEnum.ACTIVE_STATUS_CUSTOMER.message;
        }else if(useModel == 3){
            return LabelEnum.ACTIVE_STATUS_WAIT_NOTICE.message;
        }else if(useModel == 4){
            return LabelEnum.ACTIVE_STATUS_CANCEL.message;
        }else{
            return "";
        }
    }
}
